<div class="ribbon">
    <a href=""><span class="home fa fa-home"></span></a>
    <ol class="breadcrumb">
        <li>投诉单列表</li>
    </ol>
</div>

<div class="table-wrapper">

    <div class="toolbar">
        <form role="form">
            <div class="">
                <div class="col-md-11">
                    <div class="col-md-12">
                        <label class="input">责任部门：</label>
                        <label class="input"><input type="text"  class="form-control" ng-model="q.department.name" ng-disabled="true"></label>
                        <label class="input">投诉状态：</label>
                        <label class="input"><select  ng-model="q.processStatus" ng-options="complaintStatus.name for complaintStatus in vm.complaintStatusList" class="form-control" ng-selected="" ng-change="complaintStatusSearchChange()"></select></label>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <label class="input">投诉单编号：</label>
                        <label class="input"><input type="text"  class="form-control" ng-model="q.complaintSn"></label>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label class="input">时间：</label>
                        <label class="input"><input type="text"  id="datetimepickerStart"  class="form-control" ng-model="q.startTime"></label>
                        <label class="input">—</label>
                        <label class="input"><input type="text"  id="datetimepickerEnd"  class="form-control" ng-model="q.endTime"></label>
                        <button title="删除时间" ng-click="deleteTimeRange()" type="button" class="btn btn-primary btn-outline btn-xs">
                            <i class="fa fa-trash-o"></i>
                        </button>
                    </div>
                </div>
                <div class="col-md-1">
                    <button  ng-click="search()" class="btn btn-md btn-primary pull-right"><i class="fa fa-search"></i> 搜索 </button>
                </div>
            </div>
        </form>
    </div>
    <table class="table table-striped table-hover props table-sm">
        <thead>
        <tr>
            <th width="1%"></th>
            <th width="3%">序号</th>
            <th width="10%">投诉单编号</th>
            <th width="8%">投诉类型</th>
            <th width="8%">申请客户</th>
            <th width="8%">联系人</th>
            <th width="8%">联系电话</th>

            <th width="10%">预约时间</th>
            <th width="8%">处理状态</th>
            <th width="8%">责任部门</th>
            <th width="9%">处理人</th>
            <th width="10%">创建时间</th>
            <th width="15%">操作</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="complaint in vm.complaintList">
            <td></td>
            <td class="message">{{$index+1+pager.pageSize*(pager.getCurPageNo()-1)}}</td>
            <td class="message">{{complaint.complaintSn}}</td>
            <td class="message">{{complaint.complaintType.name}}</td>
            <td class="message">{{complaint.customer.userId}}</td>
            <td class="message">{{complaint.recvName}}</td>
            <td class="message">{{complaint.recvPhone}}</td>
            <td class="message">{{complaint.reserveTime}}</td>
            <td class="message">{{complaint.processStatus.name}}</td>
            <td class="message">{{complaint.department.name}}</td>
            <td class="message">{{complaint.dealedUser.userId}}|{{complaint.dealedUser.name}}</td>
            <td class="message">{{complaint.createTime}}</td>
            <td class="operate">
                <button title="详情" ng-click="viewDetails(complaint)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="">详情</i>
                </button>
                <!--<button title="指派" ng-show="complaint.processStatus.index!=2" ng-click="assign(complaint)" type="button" class="btn btn-primary btn-outline btn-xs">-->
                    <!--<i class="">指派</i>-->
                <!--</button>-->
                <button title="处理" ng-show="complaint.processStatus.index!=2" ng-click="deal(complaint)" type="button" class="btn btn-primary btn-outline btn-xs">
                    <i class="">处理</i>
                </button>
            </td>
        </tr>
        </tbody>
    </table>
    <div ng-if="vm.userList.length == 0" nj-table-no-data></div>
    <div nj-pager pager="pager"></div>
</div>
